Conversation
b570938 to
6d6f2f9
Compare
6d6f2f9 to
91cecac
Compare
d468b29 to
db8d769
Compare
|
This is very basic right now only a "successfully imported" page, plus a list, and upload form. Maybe the success page is completely useless and can be removed. Right now nothing is done with the magnets we're just storing them in the DB. Feedback welcome @Gabatxo1312 |
src/database/magnet.rs
Outdated
| #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] | ||
| pub enum Relation {} |
There was a problem hiding this comment.
This is no longer needed with SeaORM v2.
There was a problem hiding this comment.
Requires #[sea_orm::model] above derive macros.
templates/magnet/show.html
Outdated
| {% extends "base.html" %} | ||
|
|
||
| {% block main %} | ||
| You successfully uploaded magnet {{ magnet.name }} |
There was a problem hiding this comment.
This should be a proper page.
There was a problem hiding this comment.
I removed this page in a other PR
8aedba2 to
9db740e
Compare
|
@angrynode I think you can merge this PR ! |
64ded3a to
1bdfb08
Compare
1bdfb08 to
70ad423
Compare
70ad423 to
2a34db6
Compare
templates/magnet/list.html
Outdated
| {% for (magnet, content_folder) in magnets %} | ||
| <tr> | ||
| <td class="is-left" align="left"><a href="/magnet/{{ magnet.id }}">{{ magnet.name }}</a></td> | ||
| <td><a href="/folder/{{ content_folder.category_id }}/{{ content_folder.id }}">{{ content_folder.path }}</a></td> |
There was a problem hiding this comment.
That's not the correct link. It's /folders/CATEGORY/PATH where CATEGORY and PATH are strings not IDs. We may have to zip a third request to the db to fetch the Category models. Or probably we should add the category relation to the magnet so we can have a magnet at the top of the category (without an associated content folder).
| <i class="fa fa-download me-2"></i> | ||
| Download new torrent | ||
| </a> | ||
| {% if state.resolved_magnets_count != 0 %} |
There was a problem hiding this comment.
We may want to still have a link to the magnet list (with a counter) so a user is not tempted to add one more magnet that has already been uploaded.
| </div> | ||
| {% endif %} | ||
| {% endblock %} | ||
|
|
There was a problem hiding this comment.
Should we maybe add a list of pending magnets in that content folder, or any descendent?
|
2a34db6 to
a3b7f6a
Compare
Only parsing of the magnet upload is supported yet.
TODO:
In a future PR: